<template>
  <div class="about">

    
    <el-page-header @back="goBack" :content="items.name"></el-page-header>

    <el-divider></el-divider>

    <h1>{{items.name}}</h1>
    <div style="margin-bottom:50px;">{{items.content}}</div>

  </div>
</template>
<script>
export default {
  data() {
    return {
      items: {}
    };
  },
  methods: {
    goBack() {
      console.log("go back");
      this.$router.go(-1);
    }
  },
  mounted() {
    let aid = this.$route.params.id;
    console.log(aid);
    //详情
    this.$axios
      .get(
        "http://39.107.239.131/Tencent/public/index.php/index/index/content/aid/" +
          aid
      )
      .then(res => {
        console.log(res);
        this.items = res.data.data[0];
        document.title = this.items.name + " - API新闻网"
      });
  }
};
</script>